﻿using System;
using System.Web.Security;

namespace TidyBlog.Util
{
    /// <summary>
    /// 加密类
    /// </summary>
    public sealed class Encrypt
    {
        /// <summary>
        /// SHA1加密
        /// </summary>
        /// <param name="s">要加密的字符串</param>
        /// <returns>加密结果</returns>
        public static string ToSHA1(string s)
        {
            return FormsAuthentication.HashPasswordForStoringInConfigFile(s, "SHA1");
        }
    }
}